{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication/gender_clientelism.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}28 Jul 2023, 14:50:24
{txt}
{com}. 
. * This dataset contains the survey data from the 2020 wave of PAPI
. use Schuler_GenderAndClientelism_Replication1, replace /* This dataset contains the relevant variables from the 2020 PAPI survey*/
{txt}
{com}. 
. svyset, clear
{txt}
{com}. 
. * This code sets the survey weights. The PSW_psweight_opt1 sets te respondent weights; other units adjust the standard errors for the clustered nature of the design. The post stratification weights account for the differences in provincial populations
. svyset PSW_PSU [pweight=PSW_psweight_opt1], fpc(PSW_FPC1) strata(PSW_STRATA) singleunit(certainty) ///
>  || PSW_SSU, fpc(PSW_FPC2) strata(PSW_STRATA2) || villageid, fpc(PSW_FPC3) strata(PSW_STRATA3) ///
>  || _n,  poststrata(tinh)  postweight(PSW_province_population)

      {txt}pweight:{col 16}{res}PSW_psweight_opt1
          {txt}VCE:{col 16}{res}linearized
   {txt}Poststrata:{col 16}{res}tinh
   {txt}Postweight:{col 16}{res}PSW_province_population
  {txt}Single unit:{col 16}{res}certainty
     {txt}Strata 1:{col 16}{res}PSW_STRATA
         {txt}SU 1:{col 16}{res}PSW_PSU
        {txt}FPC 1:{col 16}{res}PSW_FPC1
     {txt}Strata 2:{col 16}{res}PSW_STRATA2
         {txt}SU 2:{col 16}{res}PSW_SSU
        {txt}FPC 2:{col 16}{res}PSW_FPC2
     {txt}Strata 3:{col 16}{res}PSW_STRATA3
         {txt}SU 3:{col 16}{res}villageid
        {txt}FPC 3:{col 16}{res}PSW_FPC3
     {txt}Strata 4:{col 16}<one>
         SU 4:{col 16}<observations>
        FPC 4:{col 16}<zero>
{p2colreset}{...}

{com}.  
. 
. svy: reg prefer_male2 connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val if positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      126{txt}{col 48}Number of obs{col 66}= {res}      3,878
{txt}{col 1}Number of PSUs{col 20}= {res}      208{txt}{col 48}Population size{col 66}={res}  85,846,997
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       4.77
{txt}{col 48}Prob > F{col 66}= {res}     0.0000
{txt}{col 48}R-squared{col 66}= {res}     0.0211

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}connected {c |}{col 18}{res}{space 2} .0518947{col 30}{space 2} .0178606{col 41}{space 1}    2.91{col 50}{space 3}0.005{col 58}{space 4} .0163642{col 71}{space 3} .0874252
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0019988{col 30}{space 2} .0140265{col 41}{space 1}    0.14{col 50}{space 3}0.887{col 58}{space 4}-.0259044{col 71}{space 3} .0299021
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0524858{col 30}{space 2} .0104606{col 41}{space 1}    5.02{col 50}{space 3}0.000{col 58}{space 4} .0316764{col 71}{space 3} .0732953
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0002975{col 30}{space 2} .0005222{col 41}{space 1}    0.57{col 50}{space 3}0.570{col 58}{space 4}-.0007413{col 71}{space 3} .0013363
{txt}{space 11}party {c |}{col 18}{res}{space 2}-.0268899{col 30}{space 2} .0135734{col 41}{space 1}   -1.98{col 50}{space 3}0.051{col 58}{space 4}-.0538917{col 71}{space 3}  .000112
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2} .0069028{col 30}{space 2} .0121516{col 41}{space 1}    0.57{col 50}{space 3}0.572{col 58}{space 4}-.0172707{col 71}{space 3} .0310763
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0030815{col 30}{space 2} .0041802{col 41}{space 1}   -0.74{col 50}{space 3}0.463{col 58}{space 4}-.0113973{col 71}{space 3} .0052343
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2}-.0004528{col 30}{space 2} .0063409{col 41}{space 1}   -0.07{col 50}{space 3}0.943{col 58}{space 4}-.0130669{col 71}{space 3} .0121612
{txt}papi_head_gender {c |}{col 18}{res}{space 2} .0014562{col 30}{space 2}  .012512{col 41}{space 1}    0.12{col 50}{space 3}0.908{col 58}{space 4}-.0234342{col 71}{space 3} .0263466
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0141204{col 30}{space 2} .0058387{col 41}{space 1}    2.42{col 50}{space 3}0.018{col 58}{space 4} .0025054{col 71}{space 3} .0257354
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0075716{col 30}{space 2} .0485317{col 41}{space 1}    0.16{col 50}{space 3}0.876{col 58}{space 4}-.0889733{col 71}{space 3} .1041166
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. estimates store y2020
{txt}
{com}. outreg2 using client_main_rep, e(all) replace
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect1 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==1 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      126{txt}{col 48}Number of obs{col 66}= {res}      1,310
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  85,846,997
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         81
{txt}{col 48}F({res}  10{txt},{res}     72{txt}){col 66}= {res}       3.12
{txt}{col 48}Prob > F{col 66}= {res}     0.0023
{txt}{col 48}R-squared{col 66}= {res}     0.0222

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect1 {c |}{col 18}{res}{space 2} .0568526{col 30}{space 2} .0414398{col 41}{space 1}    1.37{col 50}{space 3}0.174{col 58}{space 4}-.0255995{col 71}{space 3} .1393047
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0533874{col 30}{space 2} .0160468{col 41}{space 1}    3.33{col 50}{space 3}0.001{col 58}{space 4} .0214593{col 71}{space 3} .0853154
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0437991{col 30}{space 2} .0188425{col 41}{space 1}    2.32{col 50}{space 3}0.023{col 58}{space 4} .0063085{col 71}{space 3} .0812897
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0004733{col 30}{space 2} .0008528{col 41}{space 1}    0.55{col 50}{space 3}0.580{col 58}{space 4}-.0012234{col 71}{space 3}   .00217
{txt}{space 11}party {c |}{col 18}{res}{space 2}-.0499792{col 30}{space 2} .0224721{col 41}{space 1}   -2.22{col 50}{space 3}0.029{col 58}{space 4}-.0946915{col 71}{space 3}-.0052668
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0067618{col 30}{space 2} .0208933{col 41}{space 1}   -0.32{col 50}{space 3}0.747{col 58}{space 4}-.0483328{col 71}{space 3} .0348093
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2} .0085489{col 30}{space 2} .0074953{col 41}{space 1}    1.14{col 50}{space 3}0.257{col 58}{space 4}-.0063644{col 71}{space 3} .0234622
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2}-.0092243{col 30}{space 2}  .012472{col 41}{space 1}   -0.74{col 50}{space 3}0.462{col 58}{space 4}-.0340396{col 71}{space 3} .0155909
{txt}papi_head_gender {c |}{col 18}{res}{space 2} .0111725{col 30}{space 2} .0228158{col 41}{space 1}    0.49{col 50}{space 3}0.626{col 58}{space 4}-.0342238{col 71}{space 3} .0565689
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0028171{col 30}{space 2} .0114368{col 41}{space 1}    0.25{col 50}{space 3}0.806{col 58}{space 4}-.0199385{col 71}{space 3} .0255726
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-.0232266{col 30}{space 2} .0789378{col 41}{space 1}   -0.29{col 50}{space 3}0.769{col 58}{space 4}-.1802881{col 71}{space 3} .1338349
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect2 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==2 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      126{txt}{col 48}Number of obs{col 66}= {res}      1,304
{txt}{col 1}Number of PSUs{col 20}= {res}      208{txt}{col 48}Population size{col 66}={res}  85,846,997
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       2.97
{txt}{col 48}Prob > F{col 66}= {res}     0.0034
{txt}{col 48}R-squared{col 66}= {res}     0.0284

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect2 {c |}{col 18}{res}{space 2} -.012035{col 30}{space 2} .0199763{col 41}{space 1}   -0.60{col 50}{space 3}0.549{col 58}{space 4}-.0517743{col 71}{space 3} .0277043
{txt}{space 12}kinh {c |}{col 18}{res}{space 2}-.0056975{col 30}{space 2} .0224423{col 41}{space 1}   -0.25{col 50}{space 3}0.800{col 58}{space 4}-.0503423{col 71}{space 3} .0389474
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0598357{col 30}{space 2} .0160168{col 41}{space 1}    3.74{col 50}{space 3}0.000{col 58}{space 4} .0279731{col 71}{space 3} .0916983
{txt}{space 13}age {c |}{col 18}{res}{space 2}   .00011{col 30}{space 2}  .000841{col 41}{space 1}    0.13{col 50}{space 3}0.896{col 58}{space 4} -.001563{col 71}{space 3}  .001783
{txt}{space 11}party {c |}{col 18}{res}{space 2} .0218923{col 30}{space 2} .0252222{col 41}{space 1}    0.87{col 50}{space 3}0.388{col 58}{space 4}-.0282827{col 71}{space 3} .0720672
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2} .0235167{col 30}{space 2} .0174508{col 41}{space 1}    1.35{col 50}{space 3}0.181{col 58}{space 4}-.0111986{col 71}{space 3} .0582319
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0095754{col 30}{space 2} .0050747{col 41}{space 1}   -1.89{col 50}{space 3}0.063{col 58}{space 4}-.0196706{col 71}{space 3} .0005198
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} .0044206{col 30}{space 2}  .009621{col 41}{space 1}    0.46{col 50}{space 3}0.647{col 58}{space 4}-.0147187{col 71}{space 3} .0235599
{txt}papi_head_gender {c |}{col 18}{res}{space 2}-.0134268{col 30}{space 2} .0205888{col 41}{space 1}   -0.65{col 50}{space 3}0.516{col 58}{space 4}-.0543845{col 71}{space 3} .0275309
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0221397{col 30}{space 2} .0107077{col 41}{space 1}    2.07{col 50}{space 3}0.042{col 58}{space 4} .0008388{col 71}{space 3} .0434406
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0176565{col 30}{space 2} .0691623{col 41}{space 1}    0.26{col 50}{space 3}0.799{col 58}{space 4}-.1199294{col 71}{space 3} .1552425
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect3 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==3 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      126{txt}{col 48}Number of obs{col 66}= {res}      1,264
{txt}{col 1}Number of PSUs{col 20}= {res}      208{txt}{col 48}Population size{col 66}={res}  85,846,997
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       3.60
{txt}{col 48}Prob > F{col 66}= {res}     0.0006
{txt}{col 48}R-squared{col 66}= {res}     0.0684

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect3 {c |}{col 18}{res}{space 2} .1685568{col 30}{space 2} .0388623{col 41}{space 1}    4.34{col 50}{space 3}0.000{col 58}{space 4} .0912473{col 71}{space 3} .2458662
{txt}{space 12}kinh {c |}{col 18}{res}{space 2}-.0126894{col 30}{space 2} .0329066{col 41}{space 1}   -0.39{col 50}{space 3}0.701{col 58}{space 4}-.0781512{col 71}{space 3} .0527723
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0509732{col 30}{space 2} .0161878{col 41}{space 1}    3.15{col 50}{space 3}0.002{col 58}{space 4} .0187705{col 71}{space 3} .0831759
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0004042{col 30}{space 2} .0008261{col 41}{space 1}    0.49{col 50}{space 3}0.626{col 58}{space 4}-.0012393{col 71}{space 3} .0020476
{txt}{space 11}party {c |}{col 18}{res}{space 2} -.053738{col 30}{space 2} .0216393{col 41}{space 1}   -2.48{col 50}{space 3}0.015{col 58}{space 4}-.0967854{col 71}{space 3}-.0106906
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0007958{col 30}{space 2} .0198274{col 41}{space 1}   -0.04{col 50}{space 3}0.968{col 58}{space 4}-.0402388{col 71}{space 3} .0386472
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0064848{col 30}{space 2} .0067895{col 41}{space 1}   -0.96{col 50}{space 3}0.342{col 58}{space 4}-.0199912{col 71}{space 3} .0070216
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} .0098288{col 30}{space 2} .0109734{col 41}{space 1}    0.90{col 50}{space 3}0.373{col 58}{space 4}-.0120008{col 71}{space 3} .0316583
{txt}papi_head_gender {c |}{col 18}{res}{space 2} .0064132{col 30}{space 2}  .023907{col 41}{space 1}    0.27{col 50}{space 3}0.789{col 58}{space 4}-.0411454{col 71}{space 3} .0539718
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0148942{col 30}{space 2} .0082042{col 41}{space 1}    1.82{col 50}{space 3}0.073{col 58}{space 4}-.0014267{col 71}{space 3}  .031215
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-.0047943{col 30}{space 2}  .081629{col 41}{space 1}   -0.06{col 50}{space 3}0.953{col 58}{space 4}-.1671804{col 71}{space 3} .1575918
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. estpost tabstat prefer_male2 connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val if positions_common==1, s(count mean sd p50 min max) columns(statistics) 

{txt}Summary statistics: count mean sd p50 min max
     for variables: prefer_male2 connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val

{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(p50)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:prefer_male2}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: .0749826}}}{space 1}{space 1}{ralign 9:{res:{sf: .2633938}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:connected}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: .1923166}}}{space 1}{space 1}{ralign 9:{res:{sf: .3941661}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:kinh}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: .8380005}}}{space 1}{space 1}{ralign 9:{res:{sf:  .368493}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:female}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: .5223328}}}{space 1}{space 1}{ralign 9:{res:{sf: .4995588}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:age}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4318}}}{space 1}{space 1}{ralign 9:{res:{sf: 48.33326}}}{space 1}{space 1}{ralign 9:{res:{sf: 11.18316}}}{space 1}{space 1}{ralign 9:{res:{sf:       49}}}{space 1}{space 1}{ralign 9:{res:{sf:       18}}}{space 1}{space 1}{ralign 9:{res:{sf:       80}}}{space 1}
{space 0}{space 0}{ralign 12:party}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: .1235825}}}{space 1}{space 1}{ralign 9:{res:{sf: .3291427}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:khuvuc}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.395973}}}{space 1}{space 1}{ralign 9:{res:{sf: .4891153}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}
{space 0}{space 0}{ralign 12:income_pc}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     3990}}}{space 1}{space 1}{ralign 9:{res:{sf:   3.3401}}}{space 1}{space 1}{ralign 9:{res:{sf:  1.66824}}}{space 1}{space 1}{ralign 9:{res:{sf:        3}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        6}}}{space 1}
{space 0}{space 0}{ralign 12:education_pc}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4318}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.292497}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.075511}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        4}}}{space 1}
{space 0}{space 0}{ralign 12:papi_head_~r}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4204}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.258325}}}{space 1}{space 1}{ralign 9:{res:{sf: .4377659}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}
{space 0}{space 0}{ralign 12:trad_val}{space 1}{c |}{space 1}{ralign 9:{res:{sf:     4321}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.684564}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.000817}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        3}}}{space 1}

{com}. esttab using descriptive2020.csv, replace cell((count mean sd p50 min max)) nonumber nomtitle
{res}{txt}(output written to {browse  `"descriptive2020.csv"'})

{com}. 
. replace prefer_male = 0 if prefer_male == 1
{txt}(12,150 real changes made)

{com}. replace prefer_male = -1 if prefer_male == 2
{txt}(228 real changes made)

{com}. replace prefer_male = 1 if prefer_male == 3
{txt}(1,684 real changes made)

{com}. 
. svy: reg prefer_male connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val if positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      126{txt}{col 48}Number of obs{col 66}= {res}      3,804
{txt}{col 1}Number of PSUs{col 20}= {res}      208{txt}{col 48}Population size{col 66}={res}  85,846,997
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       4.33
{txt}{col 48}Prob > F{col 66}= {res}     0.0001
{txt}{col 48}R-squared{col 66}= {res}     0.0185

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}     prefer_male{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}connected {c |}{col 18}{res}{space 2} .0358156{col 30}{space 2} .0204218{col 41}{space 1}    1.75{col 50}{space 3}0.083{col 58}{space 4}-.0048099{col 71}{space 3}  .076441
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0006476{col 30}{space 2} .0181095{col 41}{space 1}    0.04{col 50}{space 3}0.972{col 58}{space 4} -.035378{col 71}{space 3} .0366731
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0613315{col 30}{space 2} .0118581{col 41}{space 1}    5.17{col 50}{space 3}0.000{col 58}{space 4} .0377418{col 71}{space 3} .0849211
{txt}{space 13}age {c |}{col 18}{res}{space 2}-.0005231{col 30}{space 2} .0006555{col 41}{space 1}   -0.80{col 50}{space 3}0.427{col 58}{space 4} -.001827{col 71}{space 3} .0007809
{txt}{space 11}party {c |}{col 18}{res}{space 2}-.0318457{col 30}{space 2} .0200496{col 41}{space 1}   -1.59{col 50}{space 3}0.116{col 58}{space 4}-.0717307{col 71}{space 3} .0080393
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0020879{col 30}{space 2}  .014111{col 41}{space 1}   -0.15{col 50}{space 3}0.883{col 58}{space 4}-.0301593{col 71}{space 3} .0259835
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2} -.007389{col 30}{space 2} .0047319{col 41}{space 1}   -1.56{col 50}{space 3}0.122{col 58}{space 4}-.0168022{col 71}{space 3} .0020242
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} .0021206{col 30}{space 2} .0081566{col 41}{space 1}    0.26{col 50}{space 3}0.796{col 58}{space 4}-.0141055{col 71}{space 3} .0183468
{txt}papi_head_gender {c |}{col 18}{res}{space 2}-.0015483{col 30}{space 2} .0149956{col 41}{space 1}   -0.10{col 50}{space 3}0.918{col 58}{space 4}-.0313792{col 71}{space 3} .0282826
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2}  .016303{col 30}{space 2} .0068363{col 41}{space 1}    2.38{col 50}{space 3}0.019{col 58}{space 4} .0027034{col 71}{space 3} .0299027
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0495302{col 30}{space 2} .0556743{col 41}{space 1}    0.89{col 50}{space 3}0.376{col 58}{space 4}-.0612236{col 71}{space 3} .1602841
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. 
. 
. 
. 
. *****************2021 Results****************
. 
. 
. 
. * This dataset contains the survey data from the 2021 wave of PAPI
. use Schuler_GenderAndClientelism_Replication2, replace /* This dataset contains the relevant variables from the 2021 PAPI survey*/
{txt}
{com}. 
. * This code sets the survey weights. The PSW_psweight_opt1 sets te respondent weights; other units adjust the standard errors for the clustered nature of the design. The post stratification weights account for the differences in provincial populations
. svyset PSW_PSU [pweight=PSW_psweight], fpc(PSW_FPC1) strata(PSW_STRATA) singleunit(certainty) ///
>  || PSW_SSU, fpc(PSW_FPC2) strata(PSW_STRATA2) || villageid, fpc(PSW_FPC3) strata(PSW_STRATA3) ///
>  || _n,  poststrata(tinh)  postweight(PSW_province_population)

      {txt}pweight:{col 16}{res}PSW_psweight
          {txt}VCE:{col 16}{res}linearized
   {txt}Poststrata:{col 16}{res}tinh
   {txt}Postweight:{col 16}{res}PSW_province_population
  {txt}Single unit:{col 16}{res}certainty
     {txt}Strata 1:{col 16}{res}PSW_STRATA
         {txt}SU 1:{col 16}{res}PSW_PSU
        {txt}FPC 1:{col 16}{res}PSW_FPC1
     {txt}Strata 2:{col 16}{res}PSW_STRATA2
         {txt}SU 2:{col 16}{res}PSW_SSU
        {txt}FPC 2:{col 16}{res}PSW_FPC2
     {txt}Strata 3:{col 16}{res}PSW_STRATA3
         {txt}SU 3:{col 16}{res}villageid
        {txt}FPC 3:{col 16}{res}PSW_FPC3
     {txt}Strata 4:{col 16}<one>
         SU 4:{col 16}<observations>
        FPC 4:{col 16}<zero>
{p2colreset}{...}

{com}.  
. 
. 
. svy: reg prefer_male2 connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val if positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      125{txt}{col 48}Number of obs{col 66}= {res}      5,853
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  96,208,984
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       3.41
{txt}{col 48}Prob > F{col 66}= {res}     0.0011
{txt}{col 48}R-squared{col 66}= {res}     0.0104

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}connected {c |}{col 18}{res}{space 2}  .036063{col 30}{space 2} .0099265{col 41}{space 1}    3.63{col 50}{space 3}0.000{col 58}{space 4} .0163159{col 71}{space 3}   .05581
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0055767{col 30}{space 2} .0096969{col 41}{space 1}    0.58{col 50}{space 3}0.567{col 58}{space 4}-.0137136{col 71}{space 3}  .024867
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0165646{col 30}{space 2} .0064711{col 41}{space 1}    2.56{col 50}{space 3}0.012{col 58}{space 4} .0036915{col 71}{space 3} .0294377
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0009282{col 30}{space 2} .0003255{col 41}{space 1}    2.85{col 50}{space 3}0.005{col 58}{space 4} .0002808{col 71}{space 3} .0015757
{txt}{space 11}party {c |}{col 18}{res}{space 2} .0074985{col 30}{space 2} .0127658{col 41}{space 1}    0.59{col 50}{space 3}0.559{col 58}{space 4}-.0178967{col 71}{space 3} .0328937
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0040311{col 30}{space 2} .0074935{col 41}{space 1}   -0.54{col 50}{space 3}0.592{col 58}{space 4}-.0189381{col 71}{space 3} .0108759
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0032072{col 30}{space 2} .0020996{col 41}{space 1}   -1.53{col 50}{space 3}0.130{col 58}{space 4}-.0073839{col 71}{space 3} .0009696
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2}-.0053422{col 30}{space 2} .0039974{col 41}{space 1}   -1.34{col 50}{space 3}0.185{col 58}{space 4}-.0132942{col 71}{space 3} .0026098
{txt}papi_head_gender {c |}{col 18}{res}{space 2} .0045952{col 30}{space 2} .0121623{col 41}{space 1}    0.38{col 50}{space 3}0.707{col 58}{space 4}-.0195994{col 71}{space 3} .0287898
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0065372{col 30}{space 2} .0043173{col 41}{space 1}    1.51{col 50}{space 3}0.134{col 58}{space 4}-.0020512{col 71}{space 3} .0151256
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0148414{col 30}{space 2} .0286924{col 41}{space 1}    0.52{col 50}{space 3}0.606{col 58}{space 4}-.0422369{col 71}{space 3} .0719197
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. estimates store y2021
{txt}
{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect1 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==1 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      125{txt}{col 48}Number of obs{col 66}= {res}      1,967
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  96,208,984
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       1.09
{txt}{col 48}Prob > F{col 66}= {res}     0.3788
{txt}{col 48}R-squared{col 66}= {res}     0.0086

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect1 {c |}{col 18}{res}{space 2}  .044619{col 30}{space 2} .0267632{col 41}{space 1}    1.67{col 50}{space 3}0.099{col 58}{space 4}-.0086215{col 71}{space 3} .0978594
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0138822{col 30}{space 2} .0143765{col 41}{space 1}    0.97{col 50}{space 3}0.337{col 58}{space 4}-.0147173{col 71}{space 3} .0424818
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0136297{col 30}{space 2} .0117988{col 41}{space 1}    1.16{col 50}{space 3}0.251{col 58}{space 4}-.0098418{col 71}{space 3} .0371012
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0003959{col 30}{space 2} .0004513{col 41}{space 1}    0.88{col 50}{space 3}0.383{col 58}{space 4}-.0005019{col 71}{space 3} .0012936
{txt}{space 11}party {c |}{col 18}{res}{space 2} .0257173{col 30}{space 2} .0233969{col 41}{space 1}    1.10{col 50}{space 3}0.275{col 58}{space 4}-.0208266{col 71}{space 3} .0722611
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0019566{col 30}{space 2} .0126915{col 41}{space 1}   -0.15{col 50}{space 3}0.878{col 58}{space 4}-.0272042{col 71}{space 3} .0232909
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0018362{col 30}{space 2} .0030779{col 41}{space 1}   -0.60{col 50}{space 3}0.552{col 58}{space 4} -.007959{col 71}{space 3} .0042867
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2}-.0072468{col 30}{space 2} .0059931{col 41}{space 1}   -1.21{col 50}{space 3}0.230{col 58}{space 4}-.0191689{col 71}{space 3} .0046753
{txt}papi_head_gender {c |}{col 18}{res}{space 2}-.0092029{col 30}{space 2} .0165887{col 41}{space 1}   -0.55{col 50}{space 3}0.581{col 58}{space 4}-.0422032{col 71}{space 3} .0237973
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0085194{col 30}{space 2} .0071325{col 41}{space 1}    1.19{col 50}{space 3}0.236{col 58}{space 4}-.0056694{col 71}{space 3} .0227083
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0409957{col 30}{space 2} .0460737{col 41}{space 1}    0.89{col 50}{space 3}0.376{col 58}{space 4}-.0506595{col 71}{space 3} .1326509
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect2 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==2 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      125{txt}{col 48}Number of obs{col 66}= {res}      1,958
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  96,208,984
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       1.50
{txt}{col 48}Prob > F{col 66}= {res}     0.1576
{txt}{col 48}R-squared{col 66}= {res}     0.0145

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect2 {c |}{col 18}{res}{space 2} .0451629{col 30}{space 2} .0152311{col 41}{space 1}    2.97{col 50}{space 3}0.004{col 58}{space 4} .0148634{col 71}{space 3} .0754624
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0124709{col 30}{space 2} .0166297{col 41}{space 1}    0.75{col 50}{space 3}0.455{col 58}{space 4}-.0206108{col 71}{space 3} .0455527
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0136978{col 30}{space 2} .0118925{col 41}{space 1}    1.15{col 50}{space 3}0.253{col 58}{space 4}-.0099603{col 71}{space 3} .0373558
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0010823{col 30}{space 2} .0006358{col 41}{space 1}    1.70{col 50}{space 3}0.092{col 58}{space 4}-.0001825{col 71}{space 3}  .002347
{txt}{space 11}party {c |}{col 18}{res}{space 2}-.0231353{col 30}{space 2} .0175747{col 41}{space 1}   -1.32{col 50}{space 3}0.192{col 58}{space 4}-.0580969{col 71}{space 3} .0118263
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0055225{col 30}{space 2} .0126428{col 41}{space 1}   -0.44{col 50}{space 3}0.663{col 58}{space 4} -.030673{col 71}{space 3} .0196281
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2}-.0028337{col 30}{space 2} .0034559{col 41}{space 1}   -0.82{col 50}{space 3}0.415{col 58}{space 4}-.0097086{col 71}{space 3} .0040411
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} .0009473{col 30}{space 2} .0069262{col 41}{space 1}    0.14{col 50}{space 3}0.892{col 58}{space 4}-.0128312{col 71}{space 3} .0147258
{txt}papi_head_gender {c |}{col 18}{res}{space 2}-.0107683{col 30}{space 2} .0190339{col 41}{space 1}   -0.57{col 50}{space 3}0.573{col 58}{space 4}-.0486327{col 71}{space 3} .0270961
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0053427{col 30}{space 2} .0074712{col 41}{space 1}    0.72{col 50}{space 3}0.477{col 58}{space 4}-.0095199{col 71}{space 3} .0202053
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0043599{col 30}{space 2} .0544224{col 41}{space 1}    0.08{col 50}{space 3}0.936{col 58}{space 4}-.1039037{col 71}{space 3} .1126235
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) 
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. svy: reg prefer_male2 i.connect3 kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val  if d611ba2b11_id==3 & positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      125{txt}{col 48}Number of obs{col 66}= {res}      1,928
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  96,208,984
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       1.97
{txt}{col 48}Prob > F{col 66}= {res}     0.0490
{txt}{col 48}R-squared{col 66}= {res}     0.0148

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}    prefer_male2{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}1.connect3 {c |}{col 18}{res}{space 2} .0168653{col 30}{space 2} .0181193{col 41}{space 1}    0.93{col 50}{space 3}0.355{col 58}{space 4}-.0191799{col 71}{space 3} .0529104
{txt}{space 12}kinh {c |}{col 18}{res}{space 2}-.0168054{col 30}{space 2} .0179792{col 41}{space 1}   -0.93{col 50}{space 3}0.353{col 58}{space 4}-.0525716{col 71}{space 3} .0189609
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0244932{col 30}{space 2} .0125959{col 41}{space 1}    1.94{col 50}{space 3}0.055{col 58}{space 4} -.000564{col 71}{space 3} .0495504
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0012841{col 30}{space 2} .0005154{col 41}{space 1}    2.49{col 50}{space 3}0.015{col 58}{space 4} .0002587{col 71}{space 3} .0023094
{txt}{space 11}party {c |}{col 18}{res}{space 2} .0122805{col 30}{space 2} .0203447{col 41}{space 1}    0.60{col 50}{space 3}0.548{col 58}{space 4}-.0281916{col 71}{space 3} .0527527
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0081184{col 30}{space 2} .0132186{col 41}{space 1}   -0.61{col 50}{space 3}0.541{col 58}{space 4}-.0344143{col 71}{space 3} .0181776
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2} -.004828{col 30}{space 2} .0037299{col 41}{space 1}   -1.29{col 50}{space 3}0.199{col 58}{space 4}-.0122479{col 71}{space 3}  .002592
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} -.007918{col 30}{space 2}  .007217{col 41}{space 1}   -1.10{col 50}{space 3}0.276{col 58}{space 4} -.022275{col 71}{space 3}  .006439
{txt}papi_head_gender {c |}{col 18}{res}{space 2} .0390181{col 30}{space 2} .0263883{col 41}{space 1}    1.48{col 50}{space 3}0.143{col 58}{space 4}-.0134766{col 71}{space 3} .0915128
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0084441{col 30}{space 2} .0106271{col 41}{space 1}    0.79{col 50}{space 3}0.429{col 58}{space 4}-.0126966{col 71}{space 3} .0295847
{txt}{space 11}_cons {c |}{col 18}{res}{space 2} .0013116{col 30}{space 2} .0497089{col 41}{space 1}    0.03{col 50}{space 3}0.979{col 58}{space 4}-.0975752{col 71}{space 3} .1001983
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. outreg2 using client_main_rep, e(all) excel
{txt}{browse `"client_main_rep.xml"'}
{browse `"/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication"' :dir}{com} : {txt}{stata `"seeout using "client_main_rep.txt""':seeout}

{com}. 
. * Figure 1
. coefplot y2020 y2021,  keep(connected) ciopts(lwidth(thick)) msize(medlarge) xline(0, lcolor(red) lpattern(dash) lwidth(thick)) legend(rows(1) size(small) position(6) label(2 "2020") label(4 "2021")) xtitle("Preference for Male Legislator") title("") ylab("") xlab(-.01(.01).1, labsize(small))
{res}{txt}
{com}. 
. replace prefer_male = 0 if prefer_male == 1
{txt}(13,504 real changes made)

{com}. replace prefer_male = -1 if prefer_male == 2
{txt}(233 real changes made)

{com}. replace prefer_male = 1 if prefer_male == 3
{txt}(1,527 real changes made)

{com}. 
. svy: reg prefer_male connected kinh female age party khuvuc income_pc education_pc papi_head_gender trad_val if positions_common==1
{res}{txt}(running {bf:regress} on estimation sample)
{p 0 6 2}
note: regress reduced the estimation sample,
rerunning regress with
poststratification adjustment
accounting for new estimation sample
{p_end}
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}      125{txt}{col 48}Number of obs{col 66}= {res}      5,625
{txt}{col 1}Number of PSUs{col 20}= {res}      207{txt}{col 48}Population size{col 66}={res}  96,208,984
{txt}{col 1}N. of poststrata{col 20}= {res}       63{txt}{col 48}Design df{col 66}= {res}         82
{txt}{col 48}F({res}  10{txt},{res}     73{txt}){col 66}= {res}       1.65
{txt}{col 48}Prob > F{col 66}= {res}     0.1095
{txt}{col 48}R-squared{col 66}= {res}     0.0054

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 1}     prefer_male{col 18}{c |}      Coef.{col 30}   Std. Err.{col 42}      t{col 50}   P>|t|{col 58}     [95% Con{col 71}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}connected {c |}{col 18}{res}{space 2} .0258521{col 30}{space 2} .0128598{col 41}{space 1}    2.01{col 50}{space 3}0.048{col 58}{space 4} .0002698{col 71}{space 3} .0514343
{txt}{space 12}kinh {c |}{col 18}{res}{space 2} .0090231{col 30}{space 2}  .014155{col 41}{space 1}    0.64{col 50}{space 3}0.526{col 58}{space 4}-.0191356{col 71}{space 3} .0371818
{txt}{space 10}female {c |}{col 18}{res}{space 2} .0293531{col 30}{space 2} .0082694{col 41}{space 1}    3.55{col 50}{space 3}0.001{col 58}{space 4} .0129027{col 71}{space 3} .0458036
{txt}{space 13}age {c |}{col 18}{res}{space 2} .0005935{col 30}{space 2} .0004027{col 41}{space 1}    1.47{col 50}{space 3}0.144{col 58}{space 4}-.0002075{col 71}{space 3} .0013945
{txt}{space 11}party {c |}{col 18}{res}{space 2} .0017276{col 30}{space 2} .0158364{col 41}{space 1}    0.11{col 50}{space 3}0.913{col 58}{space 4}-.0297761{col 71}{space 3} .0332313
{txt}{space 10}khuvuc {c |}{col 18}{res}{space 2}-.0009043{col 30}{space 2} .0095147{col 41}{space 1}   -0.10{col 50}{space 3}0.925{col 58}{space 4} -.019832{col 71}{space 3} .0180234
{txt}{space 7}income_pc {c |}{col 18}{res}{space 2} -.001695{col 30}{space 2} .0026838{col 41}{space 1}   -0.63{col 50}{space 3}0.529{col 58}{space 4}-.0070339{col 71}{space 3} .0036439
{txt}{space 4}education_pc {c |}{col 18}{res}{space 2} .0011262{col 30}{space 2} .0049862{col 41}{space 1}    0.23{col 50}{space 3}0.822{col 58}{space 4}-.0087929{col 71}{space 3} .0110453
{txt}papi_head_gender {c |}{col 18}{res}{space 2}-.0032915{col 30}{space 2} .0141601{col 41}{space 1}   -0.23{col 50}{space 3}0.817{col 58}{space 4}-.0314605{col 71}{space 3} .0248775
{txt}{space 8}trad_val {c |}{col 18}{res}{space 2} .0075431{col 30}{space 2} .0052879{col 41}{space 1}    1.43{col 50}{space 3}0.158{col 58}{space 4}-.0029763{col 71}{space 3} .0180625
{txt}{space 11}_cons {c |}{col 18}{res}{space 2}-.0114811{col 30}{space 2} .0360259{col 41}{space 1}   -0.32{col 50}{space 3}0.751{col 58}{space 4}-.0831482{col 71}{space 3} .0601859
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 0 79}Note: Strata with single sampling unit treated as certainty units.{txt}{p_end}

{com}. 
. *****************2022 Figure 2****************
. use Schuler_GenderAndClientelism_Replication3, replace /* This dataset contains the relevant variables from the 2022 PAPI survey*/
{txt}
{com}. 
. * connect1 is 1 if the randomized trait from Table 2 is Connection
. * kinh =1 if respondent is from majority kinh ethnic group (0 if minority)
. * female = 1 if respondent is a woman
. * age_decade is respondent's age in decades
. * khuvuc  is 1 if respondent is from urban area; 2 if from rural
. * income_pc is a six category variable corresponding to 6 percentile groups of income
. * education_pc is a four category variable corresponding to 4 quartiles of education_pc
. * papi_head_gender is 1 if the village leader is a man and 2 if the respondent's village leader is a woman 
. 
. svy: reg connect1 kinh khuvuc female age_decade party  income_pc education_pc papi_head_gender
{res}{err}variable {bf}PSW_psweight{sf} not found
{txt}{search r(111), local:r(111);}

end of do-file

{search r(111), local:r(111);}

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/pschuler/Dropbox/projects/papi gender/clientelism/do file/replication/gender_clientelism.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}28 Jul 2023, 14:50:58
{txt}{.-}
{smcl}
{txt}{sf}{ul off}